﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <title>hCard 15 - ISO date format test</title>
  
 <!-- This will be replace with one CSS file and one JavaScipt file -->
  <link rel="stylesheet" href="../css/uftestsuite.css" type="text/css" />
  <link rel="stylesheet" href="../../../testrunner/css/testrunner.css" type="text/css" />
   
  <script type="text/javascript" src="../../testrunner/javascript/prototype-1.6.0.2.js"></script> 
  <script type="text/javascript" src="../../testrunner/javascript/beautify.js"></script> 
  <script type="text/javascript" src="../../testrunner/javascript/sumo/microformat.js"></script>
  <script type="application/javascript;version=1.7" src="http://svn.mozilla.org/labs/operator/chrome/content/Microformats/Microformats.js"></script>
  <script type="text/javascript" src="../../testrunner/javascript/shiv/microformats-shiv.js"></script>
  <script type="text/javascript" src="../../testrunner/javascript/shiv/microformats-definition.js"></script>  
  <script type="text/javascript" src="../../testrunner/javascript/testrunner.js"></script>
     
</head>
<body>
    
    <div class="test-fixture">
    
    <p>
    <a href="../"><img border="0" id="testsuite-image" alt="Microformats test suite" src="../images/testsuite.gif" /></a><br />
    </p>
    
    <h1 class="summary">hCard 15 - ISO date format test - W3C Note DateTime 
	profile</h1>
    <p class="description">This page was design to comprehensively test the <a href="http://www.w3.org/TR/NOTE-datetime">W3C Note DateTime</a> profile. The IsEqualToISODate method <a href="../documentation/iso-date.htm">normalisation and compares</a> dates.</p>
    <p>From: <a href="default.htm"><span class="format">hCard</span> test suite 1.0</a></p>
    <p class="author vcard">
        Author: <a class="url fn" href="http://www.glennjones.net/">Glenn Jones</a> 
    </p>
    <!--
    <p>Output examples: 
    <ul>
    <li class="output"><a class="url" href="hcard1.js"><span class="type">JSON</span></a></li>
    <li class="output"><a class="url" href="hcard1.xml"><span class="type">XML</span></a></li>
    </ul>
    </p>
    -->
    
    <input id="unittestbutton" type="button" onclick="microformatsTestRunner.displayTestOptionForm()" value="Unit Test Runner"/>

    
    <p>Tests:</p>
    <table id="assetTable" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th>Test</th>
            <th>Result</th>
            <th>Comment</th>
        </tr>
    </thead>
    <tbody>
    
        <tr class="assert">
            <td class="test">vcard[0].rev</td>
            <td class="result">IsEqualToISODate("2007")</td>
            <td class="comment">Should find a date from text node - Year</td>
        </tr>
        
        <tr class="assert">
            <td class="test">vcard[1].rev</td>
            <td class="result">IsEqualToISODate("2007-05")</td>
            <td class="comment">Should find a date from text node - Year and 
			month</td>
        </tr>
                
        <tr class="assert">
            <td class="test">vcard[2].rev</td>
            <td class="result">IsEqualToISODate("2007-05-01")</td>
            <td class="comment">Should find a date from text node - Year, month 
			and day</td>
        </tr>
        
             <tr class="assert">
            <td class="test">vcard[3].rev</td>
            <td class="result">IsEqualToISODate("2007-05-01T21:30")</td>
            <td class="comment">Should find a date from text node - Year, month, 
			day and time</td>
        </tr>
        
        <tr class="assert">
            <td class="test">vcard[4].rev</td>
            <td class="result">IsEqualToISODate("2007-05-01T21:30Z")</td>
            <td class="comment">Should find a date from text node - UTC Year, 
			month, day and time</td>
        </tr>
                
        <tr class="assert">
            <td class="test">vcard[5].rev</td>
            <td class="result">IsEqualToISODate("2007-05-01T21:30:00Z")</td>
            <td class="comment">Should find a date from text node - UTC Year, 
			month, day and time</td>
        </tr>


     	<tr class="assert">
            <td class="test">vcard[6].rev</td>
            <td class="result">IsEqualToISODate("2007-05-01T21:30+08:00")</td>
            <td class="comment">Should find a date from text node - Year, 
			month, day and time with time zone offset</td>
        </tr>
        
        <tr class="assert">
            <td class="test">vcard[7].rev</td>
            <td class="result">IsEqualToISODate("2007-05-01T21:30:00+08:00")</td>
            <td class="comment">Should find a date from text node - Year, 
			month, day and time with time zone offset</td>
        </tr>
            
        <tr class="assert">
            <td class="test">vcard[8].rev</td>
            <td class="result">IsEqualToISODate("2007-05-01T21:30:00.0150")</td>
            <td class="comment">Should find a date from text node - Year, 
			month, day and time with decimal fraction of a second</td>
        </tr>
        
   

    </tbody>
    </table> 
    
    
    <p>History:</p>
    <ul>
	    <li class="history vevent">
	        <span class="summary">Created</span>: <abbr class="dtstart" title="2008-05-17">17 May 2008</abbr> 
	        <span class="description">by Glenn Jones</span>
	    </li>
    </ul>
    
    
    
    </div>
  
    <div id="uf">
        <!-- This may not be the best semantic use of HTML element -->
            
        <p><strong>Profile</strong> - <a href="http://www.w3.org/TR/NOTE-datetime">W3C Note DateTime</a>. This is 
		one of the subsets of the ISO 8601 standard use for microformats. </p>
        
		<!-- 0 -->
	    <div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007</span></div>	        
   		</div>    
   		
   		<!-- 1 -->
	    <div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007-05</span></div>	        
   		</div>
   		
   		<!-- 2 -->
	    <div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007-05-01</span></div>	        
   		</div>

   		<!-- 3 -->
	    <div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007-05-01T21:30</span></div>	        
   		</div>
   		 		
   		<!-- 4 -->
	    <div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007-05-01T21:30Z</span></div>	        
   		</div>
   		
   		<!-- 5 -->
	    <div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007-05-01T21:30:00Z</span></div>	        
   		</div>

   		<!-- 6 -->
	    <div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007-05-01T21:30+08:00</span></div>	        
   		</div>
   		
   		<!-- 7 -->
   		<div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007-05-01T21:30:00+08:00</span></div>	        
   		</div>
   		
   		<!--8 -->
   		<div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">2007-05-01T21:30:00.0150</span></div>	        
   		</div>
   		
   		
   		<p><strong>Not vaild date format for microformats profiles. W3C Note DateTime or RFC 3339</strong></p>
	
   		<!--9 -->
   		<div class="vcard">
		  <div class="fn">John Doe</div>
		  <div>Last updated: <span class="rev">07-05-01</span></div>	        
   		</div>


   		    
    </div>

    
    <p>
        <a rel="license" href="../license.txt">Some rights reserved</a>
    </p>
        
  
</body>

</html>